<template>
  <div class="User">
    <div class="header">
      <h2>个人资料</h2>
      <div></div>
    </div>
    <div class="container">
      <div class="left">
        <form action="">
          <div>
            <span>账号：</span>
            <span
              >{{ userinfo.userId }}
              <router-link to="#">更改</router-link></span
            >
          </div>
          <div>
            <span>名称：</span>
            <input type="text" v-model="userinfo.name" />
          </div>
          <div>
            <span>性别：</span>
            <span>
              <input
                v-model="userinfo.gender"
                class="radio"
                type="radio"
                name="gender"
                value="男"
              />男
              <input
                v-model="userinfo.gender"
                class="radio"
                type="radio"
                name="gender"
                value="女"
              />女</span
            >
          </div>
          <div>
            <span>生日：</span>
            <input v-model="userinfo.birthday" type="date" />
          </div>
          <div>
            <span>真实姓名：</span>
            <input v-model="userinfo.realName" type="text" />
          </div>
          <div>
            <span>联系电话：</span>
            <input v-model="userinfo.phone" type="text" />
          </div>
          <div>
            <span>电子邮箱：</span>
            <input v-model="userinfo.email" type="text" />
          </div>
          <div>
            <span>居住城市：</span>
            <input v-model="userinfo.city" type="text" />
          </div>
          <div>
            <span>个人签名：</span>
            <textarea v-model="userinfo.scription"></textarea>
          </div>
        </form>
      </div>
      <div class="right">
        <img
          src="https://img1.baidu.com/it/u=1960292808,1761809160&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
          alt=""
        />
        <span>更改头像</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "myUser",
  data() {
    return {
      userinfo: {
        userId: "1325839328",
        name: "huyi",
        gender: "男",
        birthday: "2022-08-12",
        realName: "站某某",
        phone: "13650456395",
        email: "V136egA@df.com",
        city: "南宁市",
        scription: "不是风一样的男人，但是和风一样轻。",
      },
    };
  },
};
</script>

<style lang="less" scoped>
.User {
  padding: 20px;
  padding-bottom: 0;
  box-sizing: border-box;
  .header {
    h2 {
      font-size: 22px;
      font-weight: normal;
      padding-bottom: 10px;
    }
    div {
      height: 40px;
      background-color: #efefef;
    }
  }
  .container {
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    .left {
      flex-basis: 60%;
      form {
        > div {
          display: block;
          padding-top: 10px;
          input {
            outline: none;
            font-size: 14px;
            // border-color: #eee;
            border: 1px solid #ccc;
            padding: 4px;
            padding-left: 10px;
            caret-color: #999;
            color: #333;
            width: 180px;
            height: 20px;
            &.radio {
              width: 14px;
              vertical-align: -4px;
              margin-right: 4px;
              cursor: pointer;
            }

            &::-webkit-input-placeholder {
              color: #ccc;
            }
          }
          &:last-child {
            display: flex;
            span {
              padding-top: 16px;
            }
            textarea {
              height: 40px;
              width: 300px;
              border: 1px solid #ccc;
              font-size: 14px;
              outline: none;
              padding: 10px;
              padding-left: 10px;
              color: #333;
              caret-color: #999;
            }
          }
        }
      }
    }
    .right {
      flex-basis: 40%;
      display: flex;
      flex-direction: column;
      align-items: center;
      img {
        width: 180px;
        height: 180px;
        display: block;
      }
      span {
        cursor: pointer;
        text-decoration: underline;
        font-size: 14px;
        margin-top: 10px;
        display: inline-block;
      }
    }
  }
}
</style>